<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">

<head profile="http://gmpg.org/xfn/11">
	<title><?php wp_title('|',true,'right'); ?><?php bloginfo('name'); ?></title>

	<meta http-equiv="Content-Type" content="<?php bloginfo('html_type'); ?>; charset=<?php bloginfo('charset'); ?>" />

	<link rel="alternate" type="application/rss+xml" title="<?php bloginfo('name'); ?> RSS Feed" href="<?php bloginfo('rss2_url'); ?>" />
		
	<link rel="pingback" href="<?php bloginfo('pingback_url'); ?>" />

	<link rel="SHORTCUT ICON" href="<?php bloginfo('template_directory'); ?>/favicon.png"/>
	<link rel="icon" type="image/vnd.microsoft.icon" href="<?php bloginfo('template_directory'); ?>/favicon.png" /> 

	<link rel="stylesheet" href="<?php bloginfo('template_directory'); ?>/style.css" type="text/css" media="all" />
	
	<!--[if lte IE 7]>
	<link rel="stylesheet" href="<?php bloginfo('stylesheet_directory'); ?>/ie.css" type="text/css" media="all" />
	<![endif]-->

<?php fp_options('general'); ?>

	<?php if ( is_singular() ) wp_enqueue_script( 'comment-reply' );?>

	<?php wp_head(); ?>

</head>
<body <?php body_class(); ?>>

<div class="wrap">

	<div class="nav">
		<ul>
			<?php fp_options('subscribe'); ?>
			<li class="home-link<?php if ( is_home() ) { ?> current_page_item<?php } ?>"><a href="<?php echo get_settings('home'); ?>" title="All posts">Everything</a></li>
			<?php // commented out 9/17/11 // wp_list_categories('title_li=&use_desc_for_title=0&depth=1');
				//$categories = wp_list_categories('echo=0&title_li=');
				//$categories = preg_replace('/title=\"(.*?)\"/','',$categories);
				//echo $categories;
			?>
			<?php wp_list_pages('title_li=');?>

		</ul>
	</div><!-- /menu -->

	<div class="header">
		<h1><a href="<?php bloginfo('siteurl'); ?>"><img src="<?php bloginfo('stylesheet_directory'); ?>/images/logo.png" alt="<?php bloginfo('sitename'); ?>" title="<?php bloginfo('sitename'); ?>" /></a></h1>

		<?php //fp_options('logo'); ?>
		<div class="descOut"><div class="descIn"><h4><?php bloginfo('description'); ?></h4></div></div>
	</div><!-- /header -->

	<div class="content">
		
		<div class="c1">
			
			<?php get_sidebar('left'); ?>
			
		</div>

		<div class="c2">

			<?php if ( is_archive() || is_search() ) { ?>
				<div class="page-head">

				<?php if (is_tag()) { ?>

					<span class="taghead"><span class="taglabel">Tag:</span> <span class="thetagitem"><?php single_tag_title(''); ?></span></span>
					<span>
						<?php echo tag_description(); ?>
					</span>
					
					
				<?php } elseif (is_category()) { ?>

					<h4><?php single_cat_title(''); ?></h4>
					<span>
					<ul class="other-cats">
							<?php
								if (is_category()) {
									$this_category = get_category($cat);
								}
								if($this_category->category_parent)
									$this_category = wp_list_categories('orderby=id&title_li=&child_of='.$this_category->category_parent."&echo=0"); else
									$this_category = wp_list_categories('orderby=id&title_li=&child_of='.$this_category->cat_ID."&echo=0&show_option_none=");
								if($this_category) echo $this_category;
							?>
						</ul>
						<?php echo category_description(); ?>
						<p class="subscribe-cat">You can subscribe to this category by using the subscribe link above.</p>
					</span>

				<?php } elseif (is_day()) { ?>

					Day: <b><?php the_time('l, F jS, Y'); ?></b>

				<?php } elseif (is_month()) { ?>

					Month: <b><?php the_time('F, Y'); ?></b>

				<?php } elseif (is_year()) { ?>

					Year: <b><?php the_time('Y'); ?></b>

				<?php } elseif (is_search()) { ?>

					Search: <b><?php the_search_query(); ?></b>

				<?php } ?>

				</div>
			<?php }?>
